package com.dp.prototype.shallow_clone;

/**
 * @Author: Ruomeng
 * @Date: 2024/11/27
 * @Description : design-pattern
 * 具体的原型类
 * 实现Cloneable标识类接口，表示当前类可以复制
 * @Version: 1.0
 */
public class ConcreteProtoType implements Cloneable {

    public ConcreteProtoType() {
        System.out.println("Create ConcreteDeepCloneProtoType Class Success");
    }

    @Override
    public ConcreteProtoType clone() throws CloneNotSupportedException {
        System.out.println("clone Class Copy");
        return (ConcreteProtoType) super.clone();
    }

}
